package com.suray.basic.wcs.plc.utils;

public enum LifterLayerType {
    TWO_CAR_LAYER(1, "两向车层"),
    FOUR_CAR_LAYER(2, "四向车层"),
    INVALID_LAYER(200, "异常层"),
    ;

    int value;
    String des;
    LifterLayerType(int value, String des) {
        this.value = value;
        this.des = des;
    }

    public int getValue() {
        return value;
    }

    public static LifterLayerType parseLocal(int value) {
        for (LifterLayerType local : LifterLayerType.values()) {
            if (local.value == value) {
                return local;
            }
        }

        return INVALID_LAYER;
    }

    @Override
    public String toString() {
        return des;
    }
}
